const express = require('express');
const app = express();
const axios=require('axios')
const url='https://www.easy-mock.com/mock/5cea2ec28347da71af1d4ab3/start/start'

app.use(express.static('static'));
app.engine('html', require('express-art-template'));
app.set('view options', {
    debug: process.env.NODE_ENV !== 'production'
});
app.get('/',(req,res)=>{
    axios.get(url).then(data=>{
        // console.log(data)
        res.render('index.html',{data:data.data})
    })
    
})
app.listen(8080)